//
//  Header.h
//  DoctorFAQs
//
//  Created by zjq on 17/2/9.
//  Copyright © 2017年 zjq. All rights reserved.
//



#ifdef DEBUG //测试
#define LZLog(...) NSLog(__VA_ARGS__)
#else   //发布
#define LZLog(...)
#endif

#ifndef Header_h
#define Header_h

#import "BaseRequest.h"
#import <Masonry.h>
#import "Tools.h"
#import "YJProgressHUD.h"
#import <MJRefresh.h>
#import "LZUserInfo.h"
#import "UIImageView+WebCache.h"

#define ESWeak(var, weakVar) __weak __typeof(&*var) weakVar = var
/***   测试请求路径 ****/
#define TestURL @"http://192.168.1.106/wdys/app.php/"
#define IconURL @"http://192.168.1.106/wdys/"
/*** 默认头像**/
#define DefaultsIcon [UIImage imageNamed:@"icon_center_tx"]

#define xsIZE [UIScreen mainScreen].bounds.size.width/320
#define ysIZE [UIScreen mainScreen].bounds.size.height/568

#define SCREEN_Width [UIScreen mainScreen].bounds.size.width
#define SCREEN_Height [UIScreen mainScreen].bounds.size.height

#define RGBColor(_R, _G, _B, _A) [UIColor colorWithRed:_R / 255.0 green:_G / 255.0 blue:_B / 255.0 alpha:_A]    /**< 使用RGBA颜色 */

#define KHColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]

#define KHGaryColor [UIColor colorWithRed:((float)((0x999999 & 0xFF0000) >> 16))/255.0 green:((float)((0x999999 & 0xFF00) >> 8))/255.0 blue:((float)(0x999999 & 0xFF))/255.0 alpha:1.0]

#define KHGaryColor666 [UIColor colorWithRed:((float)((0x666666 & 0xFF0000) >> 16))/255.0 green:((float)((0x666666 & 0xFF00) >> 8))/255.0 blue:((float)(0x666666 & 0xFF))/255.0 alpha:1.0] 

#define KHGreenColor [UIColor colorWithRed:((float)((0x4bb92c & 0xFF0000) >> 16))/255.0 green:((float)((0x4bb92c & 0xFF00) >> 8))/255.0 blue:((float)(0x4bb92c & 0xFF))/255.0 alpha:1.0]

#define KHBlackColor [UIColor colorWithRed:((float)((0x333333 & 0xFF0000) >> 16))/255.0 green:((float)((0x333333 & 0xFF00) >> 8))/255.0 blue:((float)(0x333333 & 0xFF))/255.0 alpha:1.0]


#define MYGREENColor [UIColor colorWithRed: 0/ 255.0 green:196/ 255.0 blue:47 / 255.0 alpha:1]
#define MYTEXTCOLOR [UIColor colorWithRed: 50/ 255.0 green:51/ 255.0 blue:52 / 255.0 alpha:1]
#define MYWHITECOLOR [UIColor colorWithRed: 248/ 255.0 green:248/ 255.0 blue:248 / 255.0 alpha:1]
#define MYGRAYCOLOR [UIColor colorWithRed: 248/ 255.0 green:248/ 255.0 blue:248 / 255.0 alpha:1]


#define DEFAULT_FONTSIZE    15
// 方正黑体简体字体定义
#define FONT(F) [UIFont fontWithName:@"FZHTJW--GB1-0" size:F]

#define NEWFONT(F) [UIFont systemFontOfSize:F]

#endif /* Header_h */



/***********我是华丽的分割线***********/
//0-9的数字
#define NumberRegex @"^[0-9]*$"
//邮箱
#define EmailRegex  @"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}"
//手机号码验证 手机号以13， 15，18开头，八个 \d 数字字符
//#define PhoneRegex @"^((13[0-9])|(15[^4,\\D])|(18[0,0-9]))\\d{8}$"

#define PhoneRegex @"^((13[4-9])|(147)|(15[0-2,7-9])|(178)|(18[2-4,7-8])|(13[0-2])|(145)|(15[5-6])|(176)|(18[5,6])|(133)|(153)|(177)|(18[0,1,9]))\\d{8}|(1705)|(1709)\\d{7}$"

//用户名
#define UserNameRegex @"^[A-Za-z0-9]{2,20}+$"
//密码
#define PasswordRegex @"^[a-zA-Z0-9]{6,20}+$"
//昵称
#define NickNameRegex @"[a-zA-Z\u4e00-\u9fa5][a-zA-Z0-9\u4e00-\u9fa5]+"
//身份证号
#define IdentifyRegex @"^(\\d{14}|\\d{17})(\\d|[xX])$"
//钱
#define MoneyRegex @"^([0-9]+|[0-9]{1,3}(,[0-9]{3})*)(.[0-9]{1,2})?$ "
//正则表达式判断 regex表达式 text需要判读的文本
#define Predicate(Regex,Text)  [[NSPredicate predicateWithFormat:@"SELF MATCHES %@",Regex]evaluateWithObject:Text]
/***********我是华丽的分割线***********/




